package org.spiderflow.core.model;

/**
 * 文件下载状态
 *
 * @author zsh
 */
public enum DownloadStatus {
    /**
     * URL错误
     */
    URL_ERROR(1, "URL错误"),
    /**
     * 文件存在
     */
    FILE_EXIST(2, "文件存在"),
    /**
     * 连接超时
     */
    TIME_OUT(3, "连接超时"),
    /**
     * 下载失败
     */
    DOWNLOAD_FAIL(4, "下载失败"),
    /**
     * 下载成功
     */
    DOWNLOAD_SUCCESS(5, "下载成功");

    private final int code;

    private final String name;

    DownloadStatus(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}